package com.pactera.asmp.server.dao;

import com.pactera.asmp.server.pojo.ProjectDeviceDbc;
import com.pactera.asmp.server.pojo.TProjectDeviceDbc;
import com.pactera.asmp.server.pojo.TProjectDeviceDbcDetail;
import com.pactera.asmp.server.pojo.TProjectDeviceDbcExample;
import com.pactera.asmp.server.pojo.TProjectDeviceDbcKey;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: asmp-server
 * @Package com.pactera.asmp.server.dao
 * @ClassName: TProjectDeviceDbcMapper
 * @Description: TProjectDeviceDbcMapper
 * @Date 2020/07/14 17:12
 * @Author lvzhiqiang
 * @Version 1.0
 */
@Mapper
public interface TProjectDeviceDbcMapper {
    long countByExample(TProjectDeviceDbcExample example);

    int deleteByExample(TProjectDeviceDbcExample example);

    int deleteByPrimaryKey(TProjectDeviceDbcKey key);

    int insert(TProjectDeviceDbc record);

    int insertSelective(TProjectDeviceDbc record);

    List<TProjectDeviceDbc> selectByExample(TProjectDeviceDbcExample example);

    TProjectDeviceDbc selectByPrimaryKey(TProjectDeviceDbcKey key);

    int updateByExampleSelective(@Param("record") TProjectDeviceDbc record, @Param("example") TProjectDeviceDbcExample example);

    int updateByExample(@Param("record") TProjectDeviceDbc record, @Param("example") TProjectDeviceDbcExample example);

    int updateByPrimaryKeySelective(TProjectDeviceDbc record);

    int updateByPrimaryKey(TProjectDeviceDbc record);

    int batchInsert(List<TProjectDeviceDbc> list);

    List<Map> queryProjectAndDbcByDuid(String duid);

    int clearByDeviceId(@Param("deviceId") Integer deviceId);

    List<TProjectDeviceDbcDetail> selective2(@Param("projectId") Integer projectId, @Param("deviceId") Integer deviceId,@Param("duid") String duid);

    List<ProjectDeviceDbc> getProjectDeviceDbcsByDeviceId(@Param("deviceId") Integer deviceId);
}